package com.uzai.common.enums;

/**
 * 公众号设备产品模块KEY
 */
public enum WxpubDeviceProductKeyEnum {

    /**
     * 返利
     */
    fl("fl","返利"),

    /**
     * 悠聊
     */
    uzaichat("uzaichat","悠聊"),

    ;

    private String value;
    private String desc;
    WxpubDeviceProductKeyEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }
    public String getValue() {
        return value;
    }
    public String getDesc() {
        return desc;
    }
    public static WxpubDeviceProductKeyEnum getValue(String value) {
        if (value == null) {
            return null;
        }
        for (WxpubDeviceProductKeyEnum type: WxpubDeviceProductKeyEnum.values()) {
            if (type.getValue().equals(value) ) {
                return type;
            }
        }
        return null;
    }
    public static String getDesc(String value) {
        if(getValue(value) == null){
            return null;
        }
        return getValue(value).getDesc();
    }

}
